<template>
	<view class="roots">
		<view class="tabs">
			<view class="tab" :class="{active:tabindex==0}" @click.stop="toIndex(0)">进行中</view>
			<view class="tab" :class="{active:tabindex==1}" @click.stop="toIndex(1)">已完成</view>
			<button type="warn" size="mini" class="right" @click.stop="closeClick">关闭</button>
		</view>
		<scroll-view class="main" :scroll-y="true">
			<view class="item">
				<view class="line"></view>
				<view></view>
				<view></view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabindex:0,
				list:[],
				curr:{}
			}
		},
		methods: {
			toIndex(index){
				this.tabindex=index;
				this.searchIndex(index);
			},
			closeClick(){
				plus.runtime.quit();
			},
			searchIndex(index){
				
			}
		}
	}
</script>

<style scoped lang="scss">
.roots{
	width:100vw;
	height:100vh;
	position:fixed;
	display:flex;
	flex-direction: column;
	&>.tabs{
		height:40px;
		background-color: #eee;
		display:flex;
		flex-direction: row;
		padding-left:10px;
		border-bottom: 1px solid #ccc;
		border-top:3px solid #eee;
		position:relative;
		&>.tab{
			width:70px;
			line-height: 40px;
			text-align: center;
			&.active{
				background-color:white;
				// border-radius: 5px;
				border-radius: 5px 5px 0 0;
				margin-bottom:-2px;
			}
		}
		.right{
			position:absolute;
			top:5px;
			right:5px;
		}
	}
	&>.main{
		height:calc(100vh - 40px);
	}
}
</style>
